package cn.tedu.test02;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

@Component
public class MyBPP implements BeanPostProcessor {
    @Override public Object postProcessBeforeInitialization(Object bean, String beanName)
            throws BeansException {
        System.out.println("BPP的前置处理执行了:"+beanName);
        return bean;
    }


    @Override public Object postProcessAfterInitialization(Object bean, String beanName)
            throws BeansException {
        System.out.println("BPP的后置处理执行了："+beanName);
        return bean;
    }
}
